Skip to content

Conversation

@nahurfonseca
Copy link
Contributor

Description

Fixes #b/394374465

Intending to use this snippet on the following page:
http://cloud/media-cdn/docs/quickstart#terraform

Leveraging the quick start documentation so new declarative features (compression_mode, allowed_methods, url_rewrite) may have a Terraform example.

Checklist

Readiness

  • Yes, merge this PR after it is approved
  • No, don't merge this PR after it is approved -- we need to coordinate with the team for the public launch

Style

-ish -- this is the only place in Media CDN that resources are "created". There are other places where resources are modified, i.e. a new option (created by a new feature) is turned on/off, or set up with required options.

Testing

Yes, but I was not able to use the test infrastructure because I did not have the createProject permission. So I tested the changes in my own project. Notes here:
https://b.corp.google.com/issues/394374465#comment11

  • Tests pass: terraform apply
  • Lint pass: terraform fmt check

Intended location

Note, no further updates need to be made in that page, because we are just updating the sample, not creating a new one.

  • No, this sample won't be included on cloud.google.com
    Reason:

API enablement

  • [N/A] If the sample needs an API enabled to pass testing, I have added the service to the Test setup file

Review

  • [N/A] If this sample adds a new directory, I have added codeowners to the CODEOWNERS file

@nahurfonseca nahurfonseca requested review from a team as code owners February 25, 2025 20:27
@nahurfonseca
Copy link
Contributor Author

Modified a few parameters of the second example to illustrate other popular options for cdn_policy configuration, namely, cache_mode and client_ttl.

@glasnt
Copy link
Contributor

glasnt commented Feb 26, 2025

Hi @nahurfonseca, the bug you linked is for a new feature, and shouldn't edit the quickstart, rather create a new sample you can then reference. It appears you haven't worked with Cloud Samples before, so I'll reply to the bug to give you more about this process.

@snippet-bot
Copy link

snippet-bot bot commented Feb 28, 2025

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@nahurfonseca
Copy link
Contributor Author

nahurfonseca commented Feb 28, 2025

I have created a separate example with the additional route that enables dynamic compression.
I have tested again using one of my own projects.
I was able to request a .m3u8 and a .mpd file compressed.

@glasnt
Copy link
Contributor

glasnt commented Feb 28, 2025

/gcbrun

@glasnt glasnt changed the title Prepared mediacdn_edge_cache_service for update in C.G.C. documentation feat: add mediacdn_edge_cache_service example for dynamic compression Feb 28, 2025
@glasnt glasnt enabled auto-merge (squash) February 28, 2025 03:59
@glasnt
Copy link
Contributor

glasnt commented Feb 28, 2025

Replaced by #818

@glasnt glasnt closed this Feb 28, 2025
auto-merge was automatically disabled February 28, 2025 04:52

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants